﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<title>เพิ่มโรงควบคุม</title>
</head>
<style>
#header{
	height: 32px;
	margin-right: 20px;
	margin-left: 2px;
}

#header_titile{
	float: left;
}

#main{
	width:800px;
	margin: 0 auto 0 auto;
	border: 1px solid #E5E5E5;
	padding: 26px 24px 46px;
}

#user_info{
	float: right;
	font-size: 14px;
	/*line-height: 26px;*/
	height: 25px;
	position: relative;
/*	z-index: 49; */
	border-style: solid;
	border-width: 0;
	/* margin-top: 3px; */
	padding: 0 2px 0 6px;
	display:block;
}

body{
	font-family:tahoma;
	font-size:14px;	
}
</style>
<body>
<div id="main">
<div id="header" >แก้ไขข้อมูลคุณภาพน้ำที่ผ่านการบำบัด<div id="user_info">สวัสดีคุณผู้ใช้ <?php echo $_SESSION['username']; ?><?php echo " (role:".$_SESSION['user_level'].")"; ?> <a href="<?php echo site_url('webadmin/logout') ?>">ออกจากระบบ</a></div>
    </div>
<br />
<p>
<?php 
  echo form_open("plant/update_quality/".$pid."/".$row->yid."/".$date); 
  $bool = ($_SESSION['user_level'] != "reader");

  $inputDisabled = " ";
  if ($bool == TRUE)
  {
    echo "<input type='submit' name='btsubmit' value='แก้ไข' /> ";
  }
  else
  {
    $inputDisabled = " disabled='disabled' ";
  }
  echo "<a href=".site_url('plant/plant_edit/'.$pid).">ยกเลิก</a>";
?>
</p>
<table border="1" cellspacing="0" >
  <tr>
    <th rowspan="2">ดัชนี</th>
    <th colspan="2"><?php echo $str_month; ?> <?php echo $str_year; ?></th>
  </tr>
  <tr>
    <th>ก่อนเข้าระบบ</th>
    <th>ผ่านการบำบัด</th>
  </tr>
  <tr>
    <td class="alt">BOD (mg/l)</td>
    <td class="alt"><input <?php echo $inputDisabled; ?> name="bod"     type="text" value="<?php echo $row->bod; ?>" size="8" maxlength="10" /></td>
    <td class="alt"><input <?php echo $inputDisabled; ?> name="bod_out" type="text" value="<?php echo $row->bod_out; ?>" size="8" maxlength="10" /></td>
  </tr>
  <tr>
    <td>COD (mg/l)</td>
    <td><input <?php echo $inputDisabled; ?> name="cod"     type="text" value="<?php echo $row->cod; ?>" size="8" maxlength="10" /></td>
    <td><input <?php echo $inputDisabled; ?> name="cod_out" type="text" value="<?php echo $row->cod_out; ?>" size="8" maxlength="10" /></td>
  </tr>
  <tr>
    <td class="alt">DO (mg/l)</td>
    <td class="alt"><input <?php echo $inputDisabled; ?> name="do" type="text" value="<?php echo $row->do; ?>" size="8" maxlength="10" /></td>
    <td class="alt"><input <?php echo $inputDisabled; ?> name="do_out" type="text" value="<?php echo $row->do_out; ?>" size="8" maxlength="10" /></td>
  </tr>
  <tr>
    <td>pH</td>
    <td><input <?php echo $inputDisabled; ?> name="ph" type="text" value="<?php echo $row->ph; ?>" size="8" maxlength="10" /></td>
    <td><input <?php echo $inputDisabled; ?> name="ph_out" type="text" value="<?php echo $row->ph_out; ?>" size="8" maxlength="10" /></td>
  </tr>
  <tr>
    <td class="alt">TDS (mg/l)</td>
    <td class="alt"><input <?php echo $inputDisabled; ?> name="tds" type="text" value="<?php echo $row->tds; ?>" size="8" maxlength="10" /></td>
    <td class="alt"><input <?php echo $inputDisabled; ?> name="tds_out" type="text" value="<?php echo $row->tds_out; ?>" size="8" maxlength="10" /></td>
  </tr>
  <tr>
    <td>SS (mg/l)</td>
    <td><input <?php echo $inputDisabled; ?> name="ss" type="text" value="<?php echo $row->ss; ?>" size="8" maxlength="10" /></td>
    <td><input <?php echo $inputDisabled; ?> name="ss_out" type="text" value="<?php echo $row->ss_out; ?>" size="8" maxlength="10" /></td>
  </tr>
  <tr>
    <td class="alt">TKN (mg/l)</td>
    <td class="alt"><input <?php echo $inputDisabled; ?> name="tkn" type="text" value="<?php echo $row->tkn; ?>" size="8" maxlength="10" /></td>
    <td class="alt"><input <?php echo $inputDisabled; ?> name="tkn_out" type="text" value="<?php echo $row->tkn_out; ?>" size="8" maxlength="10" /></td>
  </tr>
  <tr>
    <td>Grease &amp; oil (mg/l)</td>
    <td><input <?php echo $inputDisabled; ?> name="grease" type="text" value="<?php echo $row->grease; ?>" size="8" maxlength="10" /></td>
    <td><input <?php echo $inputDisabled; ?> name="grease_out" type="text" value="<?php echo $row->grease_out; ?>" size="8" maxlength="10" /></td>
  </tr>
  <tr>
    <td class="alt">Cd (mg/l)</td>
    <td class="alt"><input <?php echo $inputDisabled; ?> name="cd" type="text" value="<?php echo $row->cd; ?>" size="8" maxlength="10" /></td>
    <td class="alt"><input <?php echo $inputDisabled; ?> name="cd_out" type="text" value="<?php echo $row->cd_out; ?>" size="8" maxlength="10" /></td>
  </tr>
  <tr>
    <td>Cr (mg/l)</td>
    <td><input <?php echo $inputDisabled; ?> name="cr" type="text" value="<?php echo $row->cr; ?>" size="8" maxlength="10" /></td>
    <td><input <?php echo $inputDisabled; ?> name="cr_out" type="text" value="<?php echo $row->cr_out; ?>" size="8" maxlength="10" /></td>
  </tr>
  <tr>
    <td class="alt">Ni (mg/l)</td>
    <td class="alt"><input <?php echo $inputDisabled; ?> name="ni" type="text" value="<?php echo $row->ni; ?>" size="8" maxlength="10" /></td>
    <td class="alt"><input <?php echo $inputDisabled; ?> name="ni_out" type="text" value="<?php echo $row->ni_out; ?>" size="8" maxlength="10" /></td>
  </tr>
  <tr>
    <td>Cu (mg/l)</td>
    <td><input <?php echo $inputDisabled; ?> name="cu" type="text" value="<?php echo $row->cu; ?>" size="8" maxlength="10" /></td>
    <td><input <?php echo $inputDisabled; ?> name="cu_out" type="text" value="<?php echo $row->cu_out; ?>" size="8" maxlength="10" /></td>
  </tr>
  <tr>
    <td class="alt">Zn (mg/l)</td>
    <td class="alt"><input <?php echo $inputDisabled; ?> name="zn" type="text" value="<?php echo $row->zn; ?>" size="8" maxlength="10" /></td>
    <td class="alt"><input <?php echo $inputDisabled; ?> name="zn_out" type="text" value="<?php echo $row->zn_out; ?>" size="8" maxlength="10" /></td>
  </tr>
  <tr>
    <td>Pb (mg/l)</td>
    <td><input <?php echo $inputDisabled; ?> name="pb" type="text" value="<?php echo $row->pb; ?>" size="8" maxlength="10" /></td>
    <td><input <?php echo $inputDisabled; ?> name="pb_out" type="text" value="<?php echo $row->pb_out; ?>" size="8" maxlength="10" /></td>
  </tr>
  <tr>
    <td class="alt">Salinity (% NaCI)</td>
    <td class="alt"><input <?php echo $inputDisabled; ?> name="salinity" type="text" value="<?php echo $row->salinity; ?>" size="8" maxlength="10" /></td>
    <td class="alt"><input <?php echo $inputDisabled; ?> name="salinity_out" type="text" value="<?php echo $row->salinity_out; ?>" size="8" maxlength="10" /></td>
  </tr>
  <tr>
    <td>Turbidity (NTU)</td>
    <td><input <?php echo $inputDisabled; ?> name="turbidity" type="text" value="<?php echo $row->turbidity; ?>" size="8" maxlength="10" /></td>
    <td><input <?php echo $inputDisabled; ?> name="turbidity_out" type="text" value="<?php echo $row->turbidity_out; ?>" size="8" maxlength="10" /></td>
  </tr>
  <tr>
    <td class="alt">Color (NTU)</td>
    <td class="alt"><input <?php echo $inputDisabled; ?> name="color" type="text" value="<?php echo $row->color; ?>" size="8" maxlength="10" /></td>
    <td class="alt"><input <?php echo $inputDisabled; ?> name="color_out" type="text" value="<?php echo $row->color_out; ?>" size="8" maxlength="10" /></td>
  </tr>
  <tr>
    <td>TC (MPN/100 ml)</td>
    <td><input <?php echo $inputDisabled; ?> name="tc" type="text" value="<?php echo $row->tc; ?>" size="8" maxlength="10" /></td>
    <td><input <?php echo $inputDisabled; ?> name="tc_out" type="text" value="<?php echo $row->tc_out; ?>" size="8" maxlength="10" /></td>
  </tr>
  <tr>
    <td class="alt">FC (MPN/100 ml)</td>
    <td class="alt"><input <?php echo $inputDisabled; ?> name="fc" type="text" value="<?php echo $row->fc; ?>" size="8" maxlength="10" /></td>
    <td class="alt"><input <?php echo $inputDisabled; ?> name="fc_out" type="text" value="<?php echo $row->fc_out; ?>" size="8" maxlength="10" /></td>
  </tr>
  <tr>
    <td>Coliphage (PFU/100 ml)</td>
    <td><input <?php echo $inputDisabled; ?> name="coliphage" type="text" value="<?php echo $row->coliphage; ?>" size="8" maxlength="10" /></td>
    <td><input <?php echo $inputDisabled; ?> name="coliphage_out" type="text" value="<?php echo $row->coliphage_out; ?>" size="8" maxlength="10" /></td>
  </tr>
  <tr>
    <td class="alt">Helminth</td>
    <td class="alt"><input <?php echo $inputDisabled; ?> name="helminth" type="text" value="<?php echo $row->helminth; ?>" size="8" maxlength="10" /></td>
    <td class="alt"><input <?php echo $inputDisabled; ?> name="helminth_out" type="text" value="<?php echo $row->helminth_out; ?>" size="8" maxlength="10" /></td>
  </tr>
  <tr>
    <td>Residual Chlorine</td>
    <td><input <?php echo $inputDisabled; ?> name="residual" type="text" value="<?php echo $row->residual; ?>" size="8" maxlength="10" /></td>
    <td><input <?php echo $inputDisabled; ?> name="residual_out" type="text" value="<?php echo $row->residual_out; ?>" size="8" maxlength="10" /></td>
  </tr>
</table>

<br />

<p>
<?php
    if ($bool == TRUE)
    {
      echo "<input type='submit' name='btsubmit' value='แก้ไข' /> ";
    }
    echo "<a href=".site_url('plant/plant_edit/'.$pid).">ยกเลิก</a>";
?>
<?php echo form_close() ?>
<?php 
  echo "<font color='error'>";
  echo $err_msg;
  echo "</font>";
?>
<p>
</div>
</body>
</html>
